home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / createdir.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  52 lines

  1.      NOLIST
  2. CreateDir   MACRO              ; 19 Dec 88
  3. *------------------------------; Start of CreateDir macro.
  4.      NOLIST
  5.      IFC '\2','I'              ; If <PointerToDirName> is specified, then
  6.      LIST
  7.                                ; Put <PointerToDirName> in D1.
  8.      MOVE.L #\3,D1
  9.      NOLIST
  10.      IFEQ ReEntrant-1
  11.      LIST
  12.      ADD.L A5,D1
  13.      NOLIST
  14.      ENDC
  15.      ENDC
  16.      IFC '\2','D'              ; If <DirName> is specified, then
  17.      LIST
  18.                                ; Make D1 point to the directory name string.
  19.      MOVE.L #\3.str,D1
  20.      NOLIST
  21.      IFND \3.str               ; Unless it was previously defined,
  22.      LIST
  23.      SECTION DataSection,DATA  ; The ASCII directory name string goes here.
  24. \3.str:
  25.      DC.B '\3',0
  26.      CNOP 0,2
  27.      SECTION CodeSection,CODE
  28.      NOLIST
  29.      ENDC
  30.      ENDC
  31.      LIST
  32.      CallLib CreateDir,dos     ; Call CreateDir to create the directory.
  33.                                ; Put the dir read lock at <DirLockName>.
  34.      NOLIST
  35.      IFEQ ReEntrant-1
  36.      LIST
  37.      DefDS \1,1
  38.      MOVE.L D0,\1(A5)
  39.      NOLIST
  40.      ENDC
  41.      IFNE ReEntrant-1
  42.      LIST
  43.      MOVE.L D0,\1
  44.      DS_BSS \1,1,.L
  45.      NOLIST
  46.      ENDC
  47.      LIST
  48.      TST.L D0                  ; Make the zero flag indicate failure.
  49. *------------------------------; End of CreateDir macro.
  50.      ENDM
  51.      LIST
  52.